package com.bwie.sixth.house.service.impl;

import com.bwie.sixth.house.controller.MapController;
import com.bwie.sixth.house.controller.NewHouseController;
import com.bwie.sixth.house.controller.OldHouseController;
import com.bwie.sixth.house.controller.RentHouseController;
import com.bwie.sixth.house.dao.*;
import com.bwie.sixth.house.entity.*;
import com.guli.common.utils.PageUtils;
import com.guli.common.utils.Query;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;


import com.bwie.sixth.house.service.HomePageService;


@Service("homePageService")
public class HomePageServiceImpl extends ServiceImpl<HomePageDao, HomePageEntity> implements HomePageService {

    @Autowired
    private NewHouseController newHouseController;
    @Autowired
    private OldHouseController oldHouseController;
    @Autowired
    private RentHouseController rentHouseController;
    @Autowired
    private MapController mapController;

    @Override
    public void list(Map<String, Object> params, Integer newId, Integer oldId, Integer rentId, Integer mapId) {
        QueryWrapper<HomePageEntity> wrapper = new QueryWrapper<>();
//        if (wrapper!=null){
//            if (newId!=null&&newId!=0){
//                newHouseController.list(params);
//                newHouseDao.selectOne(new QueryWrapper<NewHouseEntity>().eq("new_id",newId));
//            }
//            if (oldId!=null&&oldId!=0){
//                oldHouseController.list(params)
//                oldHouseDao.selectOne(new QueryWrapper<OldHouseEntity>().eq("old_id",oldId));
//            }
//            if (rentId!=null&&rentId!=0){
//                rentHouseDao.selectOne(new QueryWrapper<RentHouseEntity>().eq("rent_id",rentId));
//            }
//            if (mapId!=null&&mapId!=0){
//                mapDao.selectOne(new QueryWrapper<MapEntity>().eq("map_id",mapId));
//            }
//        }
    }
}